//
//  HomeDirection.m
//  PhongThuyHuongNha
//
//  Created by Le Anh Tai on 10/2/13.
//  Copyright (c) 2013 Le Anh Tai. All rights reserved.
//

#import "HomeDirection.h"

@implementation HomeDirection

- (id)init
{
    self = [super init];
    
    if (self)
    {
        _phiCung = [[PhiCung alloc] init];
    }
    
    return self;
}

- (id)initWithPhiCung:(PhiCung *)phicung
{
    self = [super init];
    
    if (self)
    {
        _phiCung = phicung;
    }
    
    return self;
}

#pragma mark - Getter



- (NSArray*)get4HuongTot
{
    if (_phiCung == nil)
    {
        return nil;
    }
    
    NSInteger quaiSoIdx = _phiCung.index;
    
    if (quaiSoIdx == -1)
    {
        return nil;
    }
    
    NSArray *sinhKhi = @[_SANH_KHI, [SANH_KHI objectAtIndex:quaiSoIdx]];
    NSArray *thienY = @[_THIEN_Y, [THIEN_Y objectAtIndex:quaiSoIdx]];
    NSArray *dienNien = @[_DIEN_NIEN, [DIEN_NIEN objectAtIndex:quaiSoIdx]];
    NSArray *phucVi = @[_PHUC_VI, [PHUC_VI objectAtIndex:quaiSoIdx]];
    
    return @[sinhKhi, thienY, dienNien, phucVi];
}

- (NSArray *)get4HuongXau
{
    if (_phiCung == nil)
    {
        return nil;
    }
    
    NSInteger quaiSoIdx = _phiCung.index;
    
    if (quaiSoIdx == -1)
    {
        return nil;
    }
 
    NSArray *tuyetMenh = @[_TUYET_MENH, [TUYET_MENH objectAtIndex:quaiSoIdx]];
    NSArray *nguQuy = @[_NGU_QUY, [NGU_QUY objectAtIndex:quaiSoIdx]];
    NSArray *lucSat = @[_LUC_SAT, [LUC_SAT objectAtIndex:quaiSoIdx]];
    NSArray *hoaHai = @[_HOA_HAI, [HOA_HAI objectAtIndex:quaiSoIdx]];
    
    return @[tuyetMenh, nguQuy, lucSat, hoaHai];
}

@end
